<!DOCTYPE html>
<html class="loginHtml">
<head>
	<meta charset="utf-8">
	<title>${object.name}-文档查看</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta http-equiv="Access-Control-Allow-Origin" content="*">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<%include("/eova/include_h.html"){}%>
	<link rel="stylesheet" href="${CDN!STATIC!}/ui2/css/index.css" media="all" />
</head>
<body class="gray-bg">
	
	<div class="container-div">
		<div class="row">
	 		
	 		<div class="col-sm-12 select-table table-striped">
				<div class="bootstrap-table">


					<div class="fixed-table-toolbar">
						<div class="bs-bars pull-left">
							<div class="btn-group-sm"  role="group">
								
								 <a class="btn btn-info" onclick="bb_download();">
	            <i class="fa fa-download"></i> 下载文档
</a>

<!-- <a class="btn btn-success" onclick="bb_print();">
	            <i class="fa fa-print"></i> 在线打印
</a> -->



							</div>
						</div>
					</div>

					<div class="embed-responsive embed-responsive-16by9 fixed-table-container">
					  <iframe id="show" class="embed-responsive-item" src="" allowtransparency="true" style="border: 0; width: 100%; height: 70%;" frameborder="0"></iframe>
					  <iframe id="print" style="height: 0;width: 0"></iframe>
					</div>
            
				</div>
			</div>
	 	
    </div>
</body>
</html>



<script type="text/javascript">
var showUrl = '/rock/office/showDoc/${object.code}-${record.id}';
var downUrl = '/rock/office/downloadDoc/${object.code}-${record.id}';
		function bb_download() {
			window.open(downUrl+'?'+$.getFormParasStr($("#form_${object.id!}")));
		}
		function bb_print() {
			var show = document.getElementById('show');
			var print = document.getElementById('print');
			
			// 保证打印内容按正常比例打印
			print.contentWindow.document.head.innerHTML = show.contentWindow.document.head.innerHTML
			print.contentWindow.document.body.innerHTML = show.contentWindow.document.body.innerHTML
			print.contentWindow.focus();
			print.contentWindow.print();
		}
		
		function refresh(){
			console.log('refresh');
			 $('iframe').attr('src',showUrl);
		}
		
		$(function(){
			
			//初始刷新下数据
			refresh();	
			
		});
		 
</script>
<script type="text/javascript" src="${STATIC!}/ui/js/template.js"></script>